import { createApp } from 'vue'
import App from './App.vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import 'element-plus/theme-chalk/display.css'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import router from "./router/router.js"
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import axios from "axios"
// 全局方法
import Global from './utils/global.js'
/* 全局注册的组件 */
const app = createApp(App)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) { //注册图标
  app.component(key, component)
}

app
.use(router)
.use(ElementPlus, {
  locale: zhCn,
})
.use(Global)
.mount('#app')
app.config.globalProperties.$axios = axios

